package com.ruowei.modules.foodOrder.repository;

import com.ruowei.common.repository.BaseRepository;
import com.ruowei.modules.foodOrder.domain.MerchandiseSku;
import com.ruowei.modules.foodOrder.domain.QMerchandiseSku;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Optional;

/**
 * Spring Data  repository for the MerchandiseSku entity.
 */
@SuppressWarnings("unused")
@Repository
public interface MerchandiseSkuRepository extends BaseRepository<Long, MerchandiseSku, QMerchandiseSku> {

    List<MerchandiseSku> findAllByMerchandiseCodeAndStatus(String merchandiseCode, Boolean status);

    void deleteAllByMerchandiseCodeIn(List<String> merchandiseCodes);

    MerchandiseSku getBySkuCodeAndStatus(String skuCode, Boolean status);

    Optional<MerchandiseSku> findFirstBySkuCode(String skuCode);

    Optional<MerchandiseSku> findBySkuCodeAndStatus(String skuCode, Boolean status);
}
